<template>
  <el-row :gutter="20" type="flex" class="el-row-bg">
    <el-col :span="6">
      <el-tree
        ref="leftTree"
        class="filter-tree"
        :data="stationtree"
        :props="treetemplate"
        node-key="name"
        empty-text="暂无名称"
        default-expand-all
        highlight-current
        @node-click="selectclass"
      />
    </el-col>
    <el-col :span="14">
      <el-col :span="20">
        <div>告警列表</div>
      </el-col>
      <el-col :span="20">
        <div class="block">
          <span class="demonstration">默认</span>
          <el-date-picker
            v-model="value1"
            type="date"
            placeholder="选择日期"
          />
        </div>
      </el-col>
      <el-col :span="20" />
    </el-col>
  </el-row>
</template>
<script>
// import { mapState } from 'vuex'
export default {
  name: 'VStationRealtimeChart',
  data() {
    return {
      treetemplate: {
        children: 'children',
        label: 'name'
      },
      stationtree: []
    }
  },
  async created() {
    const result = await this.service.getStationLayoutInfo()
    if (result.flag) {
      this.stationtree =
      [{ ...result.data[0].station, children: result.data[0].point }] || []
    }
  }
}
</script>
